﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using TracedReality.RayTracing;

namespace TracedReality.Primitive
{
    /// <summary>
    /// An abstract representation of visible geometry.
    /// </summary>
    public abstract class Shape
    {
        /// <summary>
        /// The Material of this Shape.
        /// </summary>
        public Material material;

        /// <summary>
        /// The BoundingBox of this Shape.
        /// </summary>
        public BoundingBox bound;

        /// <summary>
        /// Test if the given Ray intersects this Shape.
        /// </summary>
        /// <param name="ray">Ray to test for intersection.</param>
        /// <param name="hit">Hit to update with intersection info.</param>
        /// <returns>1 if the Ray intersects this Shape from the outside,
        /// -1 if the Ray intersects this Shape from the inside,
        /// 0 if no intersection occurs.</returns>
        public abstract int Intersect(Ray ray, Hit hit);

        public abstract bool Equals(Shape s);

        public abstract bool Similar(Shape s);
    }
}
